package com.inlycat.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.inlycat.mapper.CodeMapper;
import com.inlycat.service.CodeService;

/**
 * @author jarvan4dev@163.com
 * @since 2015年8月28日下午6:14:49
 * @category
  
 **/

@Service("codeService")
public class CodeServiceImpl implements CodeService {

	@Resource
	private CodeMapper codeMapper;

	@Override
	public boolean add(String code) {
		return codeMapper.insert(code);
	}

	@Override
	public boolean delete(String code) {
		return codeMapper.delete(code);
	}

	@Override
	public boolean valid(String code) {
		return codeMapper.select(code) > 0 ? true : false;
	}

}
